import java.util.*;

/**
 * @author LKQ
 * @date 2022/6/14 12:43
 * @description 递归
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int m = sc.nextInt(), n = sc.nextInt();
            System.out.println(count(m, n));
        }
    }
    public static int count(int m, int n) {
        if (m == 0 || n == 1) {
            return 1;
        }else if (n > m) {
            return count(m, m);
        }else {
            return count(m, n - 1) + count(m - n, n);
        }
    }
}
